import request from '@/config/axios'

//获得模板管理列表
export const modelManageList = async (params) => {
  return await request.getOriginal({
    url: '/amp/machine-learning-manage/managePage',
    params
  })
}

//获得模版详情
export const modelManageDetail = async (params) => {
  return await request.getOriginal({
    url: '/amp/machine-learning-manage/byId',
    params
  })
}

export const editModelManage = async (data) => {
  return await request.postOriginal({
    url: '/amp/machine-learning-manage/manageEdit',
    data
  })
}

export const delModelManage = async (data) => {
  return await request.postOriginal({
    url: '/amp/machine-learning-manage/manageDelete',
    data
  })
}
export const createModelManage = async (data) => {
  return await request.postOriginal({
    url: '/amp/machine-learning-manage/manageAdd',
    data
  })
}

//模型版本管理
export const modelVersionList = async (params) => {
  return await request.getOriginal({
    url: '/amp/machine-learning-manage/page',
    params
  })
}

export const adoptModelVersion = async (data) => {
  return await request.postOriginal({
    url: '/amp/machine-learning-manage/add',
    data
  })
}

export const delModelVersion = async (data) => {
  return await request.postOriginal({
    url: '/amp/machine-learning-manage/delete',
    data
  })
}

export const editModelVersion = async (data) => {
  return await request.postOriginal({
    url: '/amp/machine-learning-manage/editVersion',
    data
  })
}
